1. Field of Art
This application generally relates to a software development environment. More particularly, it relates to automatically displaying a related file in an editor.
2. Description of the Related Art
Computer programmers frequently develop software applications using integrated development environments (IDEs). An IDE is a software application that usually includes an editor, a compiler and/or an interpreter, build automation tools, and a debugger. Examples of IDEs include the Xcode IDE from Apple Inc. of Cupertino, Calif., and the Visual Studio IDE from Microsoft Corp. of Redmond, Wash. Other IDEs are known to those of skill in the art.
The editor of an IDE includes features that facilitate viewing and editing text (e.g., source code or XML) and/or graphical content (e.g., representations of programming components such as data models or graphical user interface (GUI) components). The editor also includes features that facilitate moving between files and accessing related reference materials (e.g., an application programming interface (API) definition).
The editor can also include the ability to access and display related files. For example, an editor can provide a command that enables a user to quickly open a header file or a source file (the “related file”) that is related to the file that is currently being displayed in the editor (the “primary file”). As another example, an editor can provide a command that enables a user to quickly open a (related) file that contains declarations of superclasses or subclasses of classes that are contained in the currently-displayed (primary) file. As yet another example, an editor can provide a command that enables a user to see an “include group” of the currently-displayed (primary) file. An include group consists of (related) files that are “included” in the currently-displayed file (e.g., files that are declared using a “#include” statement in the currently-displayed file) and files that “include” the currently-displayed file (e.g., by containing a “#include” statement that names the currently-displayed file).
The related file can be displayed in the existing editor window (thereby replacing the primary file) or in a new editor window (thereby being displayed simultaneously with the primary file). The display of the related file is caused by a user performing an action (e.g., activating a user interface element or issuing a command). The related file is of the same type as the currently-displayed (e.g., both files are text files that contain code).